home *** CD-ROM | disk | FTP | other *** search
/ New Star Software Collection / NSS_Collection.iso / 3-170 dbase 10 for windows / 1.ima / SAMPLES.PAK / DUMP.PRG < prev    next >
Encoding:
Text File  |  1993-07-26  |  1.3 KB  |  50 lines

  1. *******************************************************************************
  2. *  PROGRAM:      Dump.prg
  3. *
  4. *  WRITTEN BY:   Borland Late Night Crew
  5. *
  6. *  DATE:         6/93
  7. *
  8. *  UPDATED:
  9. *
  10. *  VERSION:      Alpha α
  11. *
  12. *  DESCRIPTION:  This program shows the contents of the object passed to it.
  13. *                It calls Bladerunner's enum() function to create a linked
  14. *                list of the object's properties.  It then steps through that
  15. *                list displaying the name and value of each property of the
  16. *                parameter object.
  17. *
  18. *  PARAMETERS:   O, an object
  19. *
  20. *  CALLS:        None
  21. *
  22. *  USAGE:        DO Dump with O
  23. *
  24. *
  25. *
  26. *******************************************************************************
  27. procedure dump
  28. parameters o
  29.  
  30. if type("o") # "O"
  31.    ?
  32.    ? "Error: You must pass dump a parameter of type object."
  33.    ?
  34.    ? "Example1: do dump with _app"
  35.    ?
  36.    ? "Example2: x = new window()"
  37.    ? "          do dump with x"
  38.    return
  39. endif
  40.  
  41. e = enum(o) && create a linked list of the properties of O
  42. do while .not. e.eot  && while .not. end of property list
  43.     ? e.name, "--->",e.value   && display name and value of property
  44.     x = e.skip(1)     && skip to the next property
  45. enddo
  46. ?
  47. return .f.
  48.  
  49. ********************************** End of Dump.prg ****************************
  50.